equation, the residual weight is defined as below, where 0 ൑݌൑

nstant,

ݓൌ൜

݌

݂݅ݏ൐ܾ

1 െ݌

otherwise

(5.13)

ukey’s bi-square weight mechanism is used in ALSS, where ݎ

ܾሻ/ߪ and ߪൌmedian൛ඥߩሺݏെܾሻൟ/0.6745,

ݓൌቐ

1

݂݅ݎ൏0

൜max ሾ1 െቀݎ

ܾ

, 0ሿൠ

otherwise

(5.14)

move some baseline artifacts, the median values are calculated

windows and the Gaussian function is used to smooth the baseline

this algorithm. The Gaussian smooth function used in this

m is defined as below, where w is the window size, ܯ is the

f a local window indexed by j and (n) is a Gaussian function,

ܾ

ܯ࣡ሺ݅െ݆ሻ

௜ା

௝ୀ௜ି

ାଵ

(5.15)

R package for ALSS is baseline. The R code of using this

for the baseline estimation is shown below, where s is a spectra

ethod specifies a smoothing method to be used and lambda

r the regularisation constant,

baseline(s,method,lambda,…)